import redis
from dotenv import load_dotenv
import os

# 加载.env文件
load_dotenv()


def create_conn():
    host = os.getenv('REDIS_HOST')
    port = os.getenv('REDIS_PORT')
    db = os.getenv('REDIS_DB')
    conn = redis.Redis(host=host, port=port, db=db)
    return conn